-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update demo to connect with MPI #267
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doug said we shouldn't merge this. But reviewed anyway
@@ -17,6 +17,9 @@ const Header = ({ selection, showSelectionMeta, toggleShowSelectionMeta, toggleS | |||
showSelectionMeta={showSelectionMeta} | |||
toggleShowSelectionMeta={toggleShowSelectionMeta} | |||
/> | |||
<ExportToMPI | |||
sendToMPI={sendToMPI} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why passing this as a prop instead of just declaring the function here?
@@ -441,3 +483,25 @@ const SidebarFooter = () => ( | |||
</p> | |||
</div> | |||
); | |||
|
|||
const Alert = ({ visible, positive }) => { | |||
if (visible) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not visible doesn't return anything? If so, maybe we can remove the prop and do:
this.state.message.visible && <Alert positive={this.state.message.positive} />
if (visible) { | ||
if (positive) { | ||
return ( | ||
<Message id="alert-message" positive> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: a version that uses less code could be something like:
<Message id="alert-message" positive={positive} negative={!positive}>
<p>
{ positive ? "Sequence successfully exported to MPI." : "Error exporting sequence to MPI. Try again later".
</p>
</Message>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for chance to review. Looks good to me. Guzman's suggestions seem reasonable.
No description provided.